package com.xmlrpc.service;

import java.util.HashMap;
import java.util.Map;

import org.apache.xmlrpc.server.RequestProcessorFactoryFactory;
import org.apache.xmlrpc.server.RequestProcessorFactoryFactory.StatelessProcessorFactoryFactory;

public class SpringRequestProcessorFactory extends
		StatelessProcessorFactoryFactory implements
		RequestProcessorFactoryFactory {
	Map<Class<? extends IHandler>, IHandler> classHandlerMappings;
	protected void init(Map<String, IHandler> handlerMappings){
		classHandlerMappings  = new HashMap<Class<? extends IHandler>, IHandler>();
		for(String key : handlerMappings.keySet()){
			IHandler handler = handlerMappings.get(key);
			Class<? extends IHandler> clazz = handler.getClass();
			classHandlerMappings.put(clazz, handler);
		}
	}
}
